package com.example.demo.exception;

import com.example.demo.entity.CodeMsg;
import org.aspectj.apache.bcel.classfile.Code;

/**
 * 全局异常封装
 */

public class gloalException extends RuntimeException{

    private static final long servialVersionUID=1L;

    private CodeMsg codeMsg;


    public gloalException(CodeMsg codeMsg){
        super(codeMsg.toString());
        this.codeMsg=codeMsg;
    }

    public CodeMsg getCodeMsg(){
        return codeMsg;
    }


}
